home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / C64 / C-Communications / (c)c8.d64 / prg list editor (.txt) < prev    next >
Commodore BASIC  |  2007-02-04  |  3KB  |  111 lines

  1. 0 GOSUB100
  2. 1 DIMA$(300),BL$(300),F$(300),SD$(300),Z3$(15):OPEN2,8,2,"PRG COUNT,S,R"
  3. 2 INPUT#2,P$:CLOSE2
  4. 3 PC=VAL(P$)
  5. 50 GOTO1000
  6. 100 PRINT"[147][151]    ";:POKE53280,11:POKE53281,0
  7. 105 PRINT"[194][194][211] [208]ROGRAM [204]IST [197]DITOR"
  8. 106 PRINT"[163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  9. 107 PRINT"[215]RITTEN BY: [203]EN [211]PENCE"
  10. 110 PRINT"[201]NSERT [196]ISK WITH [196]OWNLOAD LIST"
  11. 120 PRINT"AND [208]RESS <[210][197][212][213][210][206]>"
  12. 130 GETA$:IFA$<>CHR$(13)THEN130
  13. 160 RETURN
  14. 170 FORX=1TOPC:BL$(X)=LEFT$(A$(X),5)
  15. 175 F$(X)="":FORW=1TO16:A$=MID$(A$(X),11+W,1)
  16. 180 IFA$=""THEN190
  17. 185 F$(X)=F$(X)+A$:NEXTW
  18. 190 FORW=1TO15:CK=LEN(A$(X))-W:IFMID$(A$(X),CK,1)=""THEN195
  19. 191 NEXTW:PRINT"[197]RROR IN [206]AME":END
  20. 195 SD$(X)=RIGHT$(A$(X),W):NEXTX
  21. 200 PRINT"[147][208]ROGRAMS AVAILABLE..."
  22. 210 PRINT"### [194]LKS. [206]AME OF [208]ROGRAM  [211]ENDER"
  23. 220 PRINT"--- ----- ---------------  ------"
  24. 230 M3=0:FORX=1TOPC
  25. 231 X$=STR$(X):X$=RIGHT$(X$,LEN(X$)-1)
  26. 232 IFLEN(X$)<3THENX$="0"+X$:GOTO232
  27. 240 PRINTX$" "BL$(X)" "F$(X)TAB(27)LEFT$(SD$(X),11)
  28. 245 M3=M3+1:IFM3>15THENPRINT"[208]RESS [210]ETURN":M3=0:GOSUB5000
  29. 250 NEXTX
  30. 260 PRINT"[193][146]DD, [196][146]ELETE, [204][146]IST OR [210][146]E-[211]AVE"
  31. 270 PRINT"->  [146][157]";
  32. 280 GETA$:IFA$=""THEN280
  33. 281 IFA$="A"ORA$="[193]"THENPRINT"[193]":GOTO300
  34. 282 IFA$="D"ORA$="[196]"THENPRINT"[196]":GOTO400
  35. 283 IFA$="R"ORA$="[210]"THENPRINT"[210]":RETURN
  36. 284 IFA$="L"ORA$="[204]"THENPRINT"[204]":GOTO200
  37. 285 GOTO280
  38. 300 PRINT"[193]DD A [198]ILE"
  39. 309 PRINT"'[193]' = [193][194][207][210][212]"
  40. 310 PRINT"[208][210][199], [211][197][209] OR [215][208][210]? ->  [146][157]";
  41. 311 GETA$:IFA$="P"ORA$="[208]"THENPRINT"[208][210][199]":TY$="[208]":GOTO320
  42. 312 IFA$="S"ORA$="[211]"THENPRINT"[211][197][209]":TY$="[211]":GOTO320
  43. 313 IFA$="W"ORA$="[215]"THENPRINT"[215][208][210]":TY$="[215]":GOTO320
  44. 314 IFA$="A"ORA$="[193]"THENPRINT"[193][194][207][210][212]":GOTO260
  45. 315 GOTO311
  46. 320 INPUT"[200]OW MANY [194]LOCKS LONG";BL
  47. 321 BL$=STR$(BL):BL$=RIGHT$(BL$,LEN(BL$)-1)
  48. 322 IFLEN(BL$)<3THENBL$="0"+BL$:GOTO322
  49. 325 PRINT"6 [195][200][210] [208]ASSWORD OR [210]ETURN"
  50. 326 PW$="":INPUTPW$:IFLEN(PW$)<>6THENIFPW$<>""THEN325
  51. 327 IFPW$=""THENPW$="NONAME":GOTO340
  52. 328 Z$=PW$:GOSUB330:PW$=Z$:GOTO340
  53. 330 FORX=1TOLEN(Z$)
  54. 331 Z2$=MID$(Z$,X,1):IFASC(Z2$)=32ORASC(Z2$)=160THENZ3$(X)=CHR$(32):GOTO334
  55. 332 IFASC(Z2$)<65THENZ3$(X)=Z2$:GOTO334
  56. 333 IFASC(Z2$)<193THENZ3$(X)=CHR$(ASC(Z2$)+128)
  57. 334 IFASC(Z2$)>192THENZ3$(X)=Z2$
  58. 335 NEXTX:Z4$="":FORX=1TOLEN(Z$):Z4$=Z4$+Z3$(X):NEXTX
  59. 336 Z$=Z4$:RETURN
  60. 340 PRINT"              1234567890123456"
  61. 341 INPUT"[206]AME OF [198]ILE";NF$
  62. 342 IFLEN(NF$)<1ORLEN(NF$)>16THEN340
  63. 343 Z$=NF$:GOSUB330:NF$=Z$
  64. 350 INPUT"[206]AME OF [211]ENDER? [211][217][211][207][208][157][157][157][157][157][157][157]";NS$
  65. 351 NS$=LEFT$(NS$,15)
  66. 352 Z$=NS$:GOSUB330:NS$=Z$
  67. 360 IFPW$="NONAME"THENFE$=TY$+"-"+BL$+PW$+NF$+""+NS$:GOTO365
  68. 361 FE$=TY$+"*"+BL$+PW$+NF$+""+NS$
  69. 365 IFPW$="NONAME"THENPRINTTY$"-"BL$" "NF$TAB(23)NS$:GOTO370
  70. 366 PRINTTY$"*"BL$" "NF$TAB(23)NS$
  71. 367 PRINT"[208]ASSWORD: "PW$
  72. 370 PRINT"[207][203]? ->  [146][157]";
  73. 371 GETA$:IFA$="Y"ORA$="[217]"THENPRINT"[217]ES":GOTO380
  74. 372 IFA$="N"ORA$="[206]"THENPRINT"[206]O":GOTO300
  75. 373 GOTO371
  76. 380 PC=PC+1:A$(PC)=FE$
  77. 390 GOTO170
  78. 400 PRINT"'0' [193]BORTS..."
  79. 410 INPUT"[201]NPUT [198]ILE # TO DELETE? 0[157][157][157]";DF
  80. 420 IFDF=0THEN200
  81. 430 IFDF>PCTHENPRINTPC"IS THE LIMIT.":GOTO400
  82. 440 PRINTBL$(DF)" "F$(DF)TAB(23)SD$(DF)
  83. 450 PRINT"[201]S THIS [207][203]? ";
  84. 460 GETA$:IFA$="Y"ORA$="[217]"THENPRINT"[217]ES":GOTO500
  85. 470 IFA$="N"ORA$="[206]"THENPRINT"[206]O":GOTO400
  86. 480 GOTO460
  87. 500 PC=PC-1:FORW=DFTOPC:A$(W)=A$(W+1):NEXTW:GOTO170
  88. 1000 OPEN1,8,15:OPEN2,8,2,"PRG LIST,L"
  89. 1010 FORX=1TOPC
  90. 1020 HP=INT(X/256):LP=X-(HP*256)
  91. 1030 PRINT#1,"P"CHR$(96+2)CHR$(LP)CHR$(HP)CHR$(0)
  92. 1040 INPUT#2,A$:A$(X)=A$:PRINTA$:NEXTX:CLOSE2:CLOSE1
  93. 2000 FORX=1TOPC
  94. 2010 IFA$(X)="DELETED"THEN3000
  95. 2020 NEXTX
  96. 2030 FORX=1TOPC:PRINTA$(X):NEXT
  97. 2035 GOSUB170
  98. 2040 OPEN1,8,15,"S0:PRG LIST,L":CLOSE1
  99. 2100 OPEN2,8,2,"PRG LIST,L,"+CHR$(43):CLOSE2
  100. 2105 OPEN1,8,15:OPEN2,8,2,"PRG LIST,L"
  101. 2110 FORX=1TOPC
  102. 2120 HP=INT(X/256):LP=X-(HP*256)
  103. 2130 PRINT#1,"P"CHR$(96+2)CHR$(LP)CHR$(HP)CHR$(0)
  104. 2140 PRINT#2,A$(X):PRINTA$(X):NEXTX:CLOSE2:CLOSE1
  105. 2145 PC$=STR$(PC):PC$=RIGHT$(PC$,LEN(PC$)-1)
  106. 2150 OPEN2,8,2,"@0:PRG COUNT,S,W":PRINT#2,PC$+CHR$(13):CLOSE2:PRINTPC"[208]ROGRAMS"
  107. 2160 END
  108. 3000 FORW=XTOPC:A$(W)=A$(W+1):NEXTW:PC=PC-1:GOTO2000
  109. 5000 GETA$:IFA$<>CHR$(13)THEN5000
  110. 5001 RETURN
  111.